<!-- pass a variable to included page -->
<%@ page import="bcared.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<%
	String today = null;
	Today t = new Today();
	today = t.getToday();
	request.setAttribute("picture", "InstructorSamples");
	request.setAttribute("title", "Customer List (for internal use only)");
	request.setAttribute("header", "Welcome : Today is " + today);
%>
 <%@ include file="header.jsp"%>
<TD width="850" vAlign="top"> 

<br /><h2>Customer List</h2><br />
	<table width=100% border=0>

		<%
			Customer cs = new Customer();
			ResultSet rs = cs.getCustomerList();
		%>
		<tr>
			<th bgcolor="#3B73B9" style="color: white;">
				Customer Name
			</th>
			<th bgcolor="#3B73B9" style="color: white;">
				Customer Type
			</th>
			<th bgcolor="#3B73B9" style="color: white;">
				City/State
			</th>
			<th bgcolor="#3B73B9" style="color: white;">
				Contact Name
			</th>
			<th bgcolor="#3B73B9" style="color: white;">
				Contact Phone
			</th>
		</tr>
		<%
			while (rs.next()) {
			Customer cust = new Customer(Integer.parseInt(rs.getString("customerID")));
			session.setAttribute("customerid",cust.getCustomerid() + "");
		%>
		
		<tr>
			<td><FONT color="#ff0066">&gt;</FONT>&nbsp;<a href="customerhome.jsp"><%=cust.getCustomername()%></a></td>
			<td><%=rs.getString("customerTypeDesc")%></td>
			<td><%=rs.getString("location")%></td>
			<td><%=rs.getString("name")%></td>
			<td><%=rs.getString("contactPhone")%></td>
		</tr>
		<%
			}
		%>
	</table>
	<%
		rs.close();
	%>
</TD></TR></TABLE></body></html>